import os
import time

ret = os.fork()
if ret == 0:
    print("=====子进程:%d--%d=====" % (os.getpid(), os.getppid()))
    print(ret)
    time.sleep(1)
else:
    print("=====父进程:%d--%d=====" % (os.getpid(), os.getppid()))
    print(ret)
    time.sleep(1)
